Skip to content

fix(session): repair incomplete tool history on restore - #3866

Merged
wsp1911 merged 1 commit into
openBitFun:mainfrom
wsp1911:dev-omen
Nov 10, 2026
Merged

wsp1911 merged 1 commit into
openBitFun:mainfrom
wsp1911:dev-omen

Conversation

@wsp1911

@wsp1911 wsp1911 commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Persisted sessions can contain an assistant tool call without its result when the application exits during tool execution. Repair the final active round during restore and before ordinary execution by appending an explicit unknown-result marker, without rerunning the interrupted tool or waiting during shutdown.

  • Rewrite repaired context snapshots at the newest represented turn index
  • Keep normalization idempotent and shared by restore, execution, and fork paths
  • Add regression coverage for in-memory and persisted snapshot repair

Persisted sessions can contain an assistant tool call without its result when the application exits during tool execution. Repair the final active round during restore and before ordinary execution by appending an explicit unknown-result marker, without rerunning the interrupted tool or waiting during shutdown.

- Rewrite repaired context snapshots at the newest represented turn index
- Keep normalization idempotent and shared by restore, execution, and fork paths
- Add regression coverage for in-memory and persisted snapshot repair
@wsp1911
wsp1911 merged commit 4e7e25d into openBitFun:main Nov 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant